<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> - 数据表格</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <style>
        th ,td{
            text-align: center;
            width:278px;
        }
        #layer-date{
            position: absolute;
            left:100px;
            top:60px;
            z-index: 1000;
            padding: 0;
            margin-left: 200px;
            margin-top: -5px;
            margin-bottom: -31px;
            border: 0;
            width: 550px;
            float: left;
        }
    </style>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content  ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <button type="button" id="addAdmin" class="btn btn-primary" data-toggle="modal" data-target="#myModal">
                        添加账号
                    </button>
                </div>
                <div class="ibox-content">

                    <table class="table table-striped table-bordered table-hover ">
                        <thead>
                        <tr>
                            <th>账号</th>
                            <th>密码</th>
                            <th>余额</th>
                            <th>管理级别</th>
                            <th>基础套餐日卡价格</th>
                            <th>基础套餐周卡价格</th>
                            <th>基础套餐月卡价格</th>
                            <th>中级套餐日卡价格</th>
                            <th>中级套餐周卡价格</th>
                            <th>中级套餐月卡价格</th>
                            <th>高级套餐日卡价格</th>
                            <th>高级套餐周卡价格</th>
                            <th>高级套餐月卡价格</th>
                            <th>创建时间</th>
                            <th style="width:600px;">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                            @if(!empty($data))
                                @foreach($data as $value)
                                    <tr class="gradeX">
                                        <td>{{$value['username']}}</td>
                                        <td>{{$value['password']}}</td>
                                        <td>{{$value['balance']}}</td>
                                        <td>{{$value['designation']}}</td>
                                        <td>{{$value['primary-day']}}</td>
                                        <td>{{$value['primary-week']}}</td>
                                        <td>{{$value['primary-month']}}</td>
                                        <td>{{$value['middle-day']}}</td>
                                        <td>{{$value['middle-week']}}</td>
                                        <td>{{$value['middle-month']}}</td>
                                        <td>{{$value['height-day']}}</td>
                                        <td>{{$value['height-week']}}</td>
                                        <td>{{$value['height-month']}}</td>
                                        <td>{{$value['created_at']}}</td>
                                        <td>
                                            <button class="btn btn-danger admin-delete" data-id="{{ $value['manage_id'] }}" data-toggle="modal" data-target="" type="button"><span class="bold">删除</span></button>
                                            <button class="btn btn-primary admin-update" data-toggle="modal" data-target="#myModal5"
                                                    data-id="{{ $value['manage_id'] }}" data-name="{{$value['username']}}" data-pass="{{$value['password']}}" data-level="{{$value['level']}}"
                                                    data-p-day="{{$value['primary-day']}}"  data-p-week="{{$value['primary-week']}}"  data-p-month="{{$value['primary-month']}}"
                                                    data-m-day="{{$value['middle-day']}}"  data-m-week="{{$value['middle-week']}}"  data-m-month="{{$value['middle-month']}}"
                                                    data-h-day="{{$value['height-day']}}"  data-h-week="{{$value['height-week']}}"  data-h-month="{{$value['height-month']}}"
                                                    type="button"><span class="bold">修改</span>
                                            </button>
                                            <button class="btn btn-success admin-recharge" data-id="{{ $value['manage_id'] }}" data-toggle="modal" data-target="#myModal6" type="button"><span class="bold">充值</span></button>

                                        </td>
                                    </tr>
                                @endforeach
                            @else
                                <tr>
                                    <th colspan="15">还没有任何信息哦！</th>
                                </tr>
                            @endif
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    {{--管理员信息修改--}}
    <div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">管理员信息修改</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" action="/adminupdate" method="post">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户名：</label>

                            <div class="col-sm-8">
                                <input type="text" id="username" name="username" value="" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">密码：</label>
                            <div class="col-sm-8">
                                <input type="text" id="pass" name="password" value=""  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">基础套餐日卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="p-day" name="primary-day" value=""   class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">基础套餐周卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="p-week" name="primary-week" value=""  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">基础套餐月卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="p-month" name="primary-month" value=""  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">中级套餐日卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="m-day" value="" name="middle-day"  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">中级套餐周卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" name="middle-week" id="m-week" value="" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">中级套餐月卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" name="middle-month" id="m-month" value=""  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">高级套餐日卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="h-day" name="height-day"  value=""  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">高级套餐周卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="h-week" name="height-week" value=""  class="form-control">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">高级套餐月卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="h-month" value="" name="height-month"  class="form-control">
                            </div>
                        </div>

                        <input type="hidden" value="" id="manage_id"  name="manage_id">

                        {!! csrf_field() !!}

                        <div class="form-group">
                            <label class="col-sm-3 control-label">账户类型：</label>
                            <div class="col-sm-8">
                                <input type="radio" name="level" value="2" id="super">超级管理员  &nbsp;  &nbsp;&nbsp;  &nbsp;
                                <input type="radio" name="level" value="3" id="common">客服&nbsp;&nbsp;&nbsp;  &nbsp;
                                <input type="radio" name="level" value="1" id="online">普通管理员&nbsp;&nbsp;&nbsp;  &nbsp;
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>

                    </form>

                </div>

            </div>
        </div>
    </div>
    {{--管理员信息修改--}}


    {{--管理员账户充值--}}
    <div class="modal inmodal fade" id="myModal6" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">管理员充值</h4>
                </div>
                <div class="modal-body">

                    <form class="form-horizontal">
                        <div class="form-group">
                            <label style="width:70px;" class="col-sm-3 control-label">金额：</label>
                            <div class="col-sm-8">
                                <input type="text" id="money" name="money" value="" class="form-control">
                            </div>
                            <input type="hidden" id="manage_id"  name="id" value="">

                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                            <button type="button" id="recharge" class="btn btn-primary">充值</button>
                        </div>
                    </form>
                </div>

            </div>
        </div>
    </div>
    {{--管理员账户充值--}}



    {{--管理员添加--}}
    <div class="modal inmodal fade" id="myModal" tabindex="-1" role="dialog"  aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                    <h4 class="modal-title">添加管理员</h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" action="/admin/add" method="post">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">用户名：</label>

                            <div class="col-sm-8">
                                <input type="text" id="username" name="username" value="" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">密码：</label>
                            <div class="col-sm-8">
                                <input type="text" id="pass" name="password" value=""  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">基础套餐日卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="p-day" name="primary-day" value="3"   class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">基础套餐周卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="p-week" name="primary-week" value="10"  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">基础套餐月卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="p-month" name="primary-month" value="20"  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">中级套餐日卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="m-day" value="8" name="middle-day"  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">中级套餐周卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" name="middle-week" id="m-week" value="25" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">中级套餐月卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" name="middle-month" id="m-month" value="50"  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">高级套餐日卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="h-day" name="height-day"  value="15"  class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">高级套餐周卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="h-week" name="height-week" value="60"  class="form-control">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">高级套餐月卡价格：</label>
                            <div class="col-sm-8">
                                <input type="number" id="h-month" value="90" name="height-month"  class="form-control">
                            </div>
                        </div>

                        {!! csrf_field() !!}

                        <div class="form-group">
                            <label class="col-sm-3 control-label">账户类型：</label>
                            <div class="col-sm-8">
                                <input type="radio" name="level" value="2" class="super">超级管理员  &nbsp;  &nbsp;&nbsp;  &nbsp;
                                <input type="radio" name="level" value="3" class="online">客服&nbsp;&nbsp;&nbsp;  &nbsp;
                                <input type="radio" name="level" value="1" class="common">普通管理员&nbsp;&nbsp;&nbsp;  &nbsp;
                            </div>
                        </div>

                        <div id="online_team_qq">
                            <div  class="form-group">
                                <label class="col-sm-3 control-label">客服QQ：</label>
                                <div class="col-sm-8">
                                    <input type="text" id="h-month" value="" placeholder="客服 QQ " name="qq"  class="form-control">
                                </div>
                            </div>
                            <div  class="form-group">
                                <label class="col-sm-3 control-label">客服名称：</label>
                                <div class="col-sm-8">
                                    <input type="text" id="h-month" value="" placeholder="客服名称 " name="qq_name"  class="form-control">
                                </div>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>

                    </form>

                </div>

            </div>
        </div>
    </div>

    {{--管理员添加--}}


</div>

<!-- 全局js -->
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>



<script src="js/plugins/jeditable/jquery.jeditable.js"></script>

<!-- Data Tables -->
<script src="js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>

<!-- 自定义js -->
<script src="js/content.js?v=1.0.0"></script>
<script src="js/admin.js"></script>


<script src="js/plugins/layer/laydate/laydate.js"></script>

<!-- Page-Level Scripts -->
<script>

    function fnClickAddRow() {
        $('#editable').dataTable().fnAddData([
            "Custom row",
            "New row",
            "New row",
            "New row",
            "New row"]);

    }
</script>




</body>

</html>
